<!-- inc:head -->

<div class="notice">
&raquo; 添加单页面信息
<input type="button" value="单页面信息列表" onclick="tourl('admin.php?file=onepage&act=list')">
</div>

<div style="height:2px;"><div></div></div>

<div class="none">
<form method="post" action="admin.php?file=onepage&act=addok" onsubmit="return chk();">
</div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
	<div class="left">单页面名称：<span style="color:red;">*</span></div>
	<div class="right">
		<input type="text" name="subject" id="subject" class="long_input">
		<img src="images/style.gif" title="主题样式" style="cursor:pointer;" align="absmiddle" onclick="subject_css(this)">
		<span class="clue_on">[请填写名称]</span>
	</div>
	<div class="clear"></div>
</div>

<input type="hidden" name="style" id="style">

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
	<div class="left">组：</div>
	<div class="right">
		<select name="groupid" id="groupid">
		<option value="0">不设定所属组</option>
		<!-- $grouplist AS $key=>$value -->
		<option value="{:$value[id]}">{:$value[groupname]}</option>
		<!-- end -->
		</select>
	</div>
	<div class="clear"></div>
</div>


<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
	<div class="left">状态：</div>
	<div class="right">
		<input type="checkbox" name="ifcheck" id="ifcheck" checked> <span class="clue_on">[暂停该单页面的使用，请将打勾去掉，反之请打上勾]</span>
	</div>
	<div class="clear"></div>
</div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
	<div class="left">排序：</div>
	<div class="right">
		<input type="text" name="taxis" id="taxis" class="short_input" value="255">
		<span class="clue_on">[最越小越往前靠，不能超过255]</span>
	</div>
	<div class="clear"></div>
</div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
	<div class="left">自定义模板：</div>
	<div class="right">
		<input type="text" name="onepage_tpl" id="onepage_tpl">
		<span class="clue_on">[不设定使用系统默认]</span>
	</div>
	<div class="clear"></div>
</div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
	<div class="left">链接网址：</div>
	<div class="right">
		<input type="text" name="onepage_url" id="onepage_url" class="long_input">
		<span class="clue_on">[使用链接网址后内容无效，外链均在新窗口打开]</span>
	</div>
	<div class="clear"></div>
</div>

<div class="table">
	<div class="left">内容：</div>
	<div class="right">{inc:fckeditor}</div>
	<div class="clear"></div>
</div>

<br /><br />
<div class="table">
	<div class="left"></div>
	<div class="right"><input type="submit" id="onepage_submit" name="onepage_submit" value="添 加"></div>
	<div class="clear"></div>
</div>

</form>

<script type="text/javascript">
function subject_css(v)
{
	var vLeft = getLeft(v);
	var vTop = getTop(v);
	Layer.init('admin.php?file=open&act=style&inputname=style&subject_input=subject',375,170,vLeft,vTop);
}
function chk()
{
	var subject = $("subject").value;
	if(!subject)
	{
		alert("单页面名称不能为空");
		return false;
	}
	var oEditor = FCKeditorAPI.GetInstance('content');
	var content = oEditor.GetXHTML(true);
	var url = $("onepage_url").value;
	if(!url && !content)
	{
		alert("链接和内容必须有一个不为空");
		return false;
	}
	$("onepage_submit").disabled = true;
}
</script>
<!-- inc:foot -->